package com.av.bcacc.javaapi.thread.daemon;
/**
 * @description 守护线程测试类:当普通线程执行完毕后，守护线程也没有执行下去的必要，但是不会立马停止。
 * @author weiliang hu
 * @time 2021/7/17 11:51
 * @email:2072025612@qq.com
 */

public class DeamonTest {
    public static void main(String[] args) {
        Thread001 thread001 =new Thread001();
        thread001.setName("女神线程");
        DeamonThread deamonThread=new DeamonThread();
        deamonThread.setName("备胎线程");
        deamonThread.setDaemon(true);
        thread001.start();
        deamonThread.start();

    }
}
